require("../../$res/plugin/bootstrap-datepicker");
require("../../$res/plugin/bootstrap-datepicker/css/datetimepicker.css");
module.exports = {
    template: require("./tpl/timePicker.htm"),
    props: {
        type: String,
        value: String
    },
    data: function () {
        return {
            res: new Date().getTime()
        }
    },
    mounted: function () {
        var $this = this;
        var ele = '#' + $this.type + $this.res;
        $(ele).datetimepicker({
            format: 'yyyy-mm-dd hh:ii',
            endDate:new Date(),
            autoclose: true
        }).on('changeDate', function (ev) {
            $this.$emit("input", ev.currentTarget.value);
        });
    }
};
